Termination w.r.t. Q of the following Term Rewriting System could be disproven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(and(tt, X)) → mark(X)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 2·x1   
POL(tt) = 1   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(length(nil)) → mark(0)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 2·x1   
POL(tt) = 0   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(nil) → active(nil)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2 + 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = 2·x1   
POL(nil) = 2   
POL(s(x1)) = x1   
POL(tt) = 0   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(tt) → active(tt)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = x1   
POL(mark(x1)) = 2·x1   
POL(s(x1)) = x1   
POL(tt) = 1   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

ACTIVE(length(cons(N, L))) → S(length(L))
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
ACTIVE(length(cons(N, L))) → LENGTH(L)
AND(X1, mark(X2)) → AND(X1, X2)
MARK(length(X)) → MARK(X)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(zeros) → CONS(0, zeros)
LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)
S(active(X)) → S(X)
S(mark(X)) → S(X)
MARK(s(X)) → S(mark(X))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(length(X)) → ACTIVE(length(mark(X)))
AND(X1, active(X2)) → AND(X1, X2)
AND(mark(X1), X2) → AND(X1, X2)
MARK(zeros) → ACTIVE(zeros)
MARK(length(X)) → LENGTH(mark(X))
MARK(0) → ACTIVE(0)
ACTIVE(zeros) → MARK(cons(0, zeros))
CONS(active(X1), X2) → CONS(X1, X2)
AND(active(X1), X2) → AND(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(length(cons(N, L))) → S(length(L))
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
ACTIVE(length(cons(N, L))) → LENGTH(L)
AND(X1, mark(X2)) → AND(X1, X2)
MARK(length(X)) → MARK(X)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(zeros) → CONS(0, zeros)
LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)
S(active(X)) → S(X)
S(mark(X)) → S(X)
MARK(s(X)) → S(mark(X))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(length(X)) → ACTIVE(length(mark(X)))
AND(X1, active(X2)) → AND(X1, X2)
AND(mark(X1), X2) → AND(X1, X2)
MARK(zeros) → ACTIVE(zeros)
MARK(length(X)) → LENGTH(mark(X))
MARK(0) → ACTIVE(0)
ACTIVE(zeros) → MARK(cons(0, zeros))
CONS(active(X1), X2) → CONS(X1, X2)
AND(active(X1), X2) → AND(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 5 SCCs with 7 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QDPSizeChangeProof
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(X)) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(zeros) → ACTIVE(zeros)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(zeros) → ACTIVE(zeros)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(length(X)) → MARK(X)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(s(x1)) = x1   
POL(zeros) = 0   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(zeros) → ACTIVE(zeros)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(zeros) → ACTIVE(zeros)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( active(x1) ) =
/0\
\0/
+
/00\
\11/
·x1

M( cons(x1, x2) ) =
/0\
\0/
+
/11\
\01/
·x1+
/00\
\00/
·x2

M( zeros ) =
/1\
\0/

M( mark(x1) ) =
/0\
\0/
+
/00\
\11/
·x1

M( s(x1) ) =
/0\
\0/
+
/11\
\11/
·x1

M( length(x1) ) =
/0\
\0/
+
/00\
\00/
·x1

M( 0 ) =
/0\
\0/

Tuple symbols:
M( MARK(x1) ) = 0+
[1,0]
·x1

M( ACTIVE(x1) ) = 0+
[0,0]
·x1


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(X)) → ACTIVE(length(mark(X)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 1 + x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(s(x1)) = x1   
POL(zeros) = 0   

The following usable rules [17] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ QDPOrderProof
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(X)) → ACTIVE(length(mark(X)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = 0   
POL(s(x1)) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ Narrowing
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(length(X)) → ACTIVE(length(mark(X))) at position [0] we obtained the following new rules:

MARK(length(0)) → ACTIVE(length(active(0)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(x0)) → ACTIVE(length(x0))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ Narrowing
QDP
                                                        ↳ Narrowing
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(0)) → ACTIVE(length(active(0)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(length(0)) → ACTIVE(length(active(0))) at position [0] we obtained the following new rules:

MARK(length(0)) → ACTIVE(length(0))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Narrowing
QDP
                                                            ↳ DependencyGraphProof
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(0)) → ACTIVE(length(0))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Narrowing
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
QDP
                                                                ↳ RuleRemovalProof
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 1 + x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = 1 + 2·x1   
POL(mark(x1)) = x1   
POL(s(x1)) = x1   
POL(zeros) = 0   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Narrowing
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ RuleRemovalProof
QDP
                                                                    ↳ QDPOrderProof
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
The remaining pairs can at least be oriented weakly.

MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(x0)) → ACTIVE(length(x0))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( active(x1) ) =
/0\
\0/
+
/10\
\01/
·x1

M( cons(x1, x2) ) =
/0\
\0/
+
/00\
\00/
·x1+
/11\
\00/
·x2

M( zeros ) =
/0\
\0/

M( mark(x1) ) =
/0\
\0/
+
/10\
\01/
·x1

M( s(x1) ) =
/0\
\1/
+
/10\
\00/
·x1

M( length(x1) ) =
/0\
\1/
+
/11\
\10/
·x1

M( 0 ) =
/0\
\0/

Tuple symbols:
M( MARK(x1) ) = 1+
[1,0]
·x1

M( ACTIVE(x1) ) = 0+
[0,1]
·x1


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
mark(s(X)) → active(s(mark(X)))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Narrowing
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ RuleRemovalProof
                                                                  ↳ QDP
                                                                    ↳ QDPOrderProof
QDP
                                                                        ↳ NonTerminationProof
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)


s = ACTIVE(length(active(zeros))) evaluates to t =ACTIVE(length(active(zeros)))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

ACTIVE(length(active(zeros)))ACTIVE(length(mark(cons(0, zeros))))
with rule active(zeros) → mark(cons(0, zeros)) at position [0,0] and matcher [ ]

ACTIVE(length(mark(cons(0, zeros))))ACTIVE(length(cons(0, zeros)))
with rule length(mark(X)) → length(X) at position [0] and matcher [X / cons(0, zeros)]

ACTIVE(length(cons(0, zeros)))MARK(s(length(zeros)))
with rule ACTIVE(length(cons(N, L))) → MARK(s(length(L))) at position [] and matcher [N / 0, L / zeros]

MARK(s(length(zeros)))MARK(length(zeros))
with rule MARK(s(X)) → MARK(X) at position [] and matcher [X / length(zeros)]

MARK(length(zeros))ACTIVE(length(active(zeros)))
with rule MARK(length(zeros)) → ACTIVE(length(active(zeros)))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(X)) → ACTIVE(length(mark(X)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = 0   
POL(s(x1)) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(X)) → ACTIVE(length(mark(X)))

The TRS R consists of the following rules:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.